/**
 * JAVACC DEMO 1.0
 * @copy right apache company All rights reserved. 
 * @Package com.apache.task.entity  
 */
package com.apache.database.model;

import java.util.Map;

import com.apache.tools.StrUtil;

/**
 * description:  任务配置的封装类
 * @author Hou Dayu 创建时间：2016-1-14
 * @Copyright(c)2014:
 */
public class TaskEntity extends Task {

	private String sysName;//所属系统
	private String serverIp;//启用IP

	public TaskEntity(){

	}

	public TaskEntity(Map data){
		this.taskKey = String.valueOf(data.get("taskKey"));
		this.className=String.valueOf(data.get("className"));//定时任务类
		this.methodName=String.valueOf(data.get("methodName"));//方法名
		this.taskType=String.valueOf(data.get("taskType"));//任务类型
		this.intervalType=Long.valueOf(StrUtil.doNull(String.valueOf(data.get("intervalType")),"0"));//间隔类型:1按天间隔,0按小时间隔
		this.hour=Long.valueOf(StrUtil.doNull(String.valueOf(data.get("hour")),"0"));//小时
		this.minute=Long.valueOf(StrUtil.doNull(String.valueOf(data.get("minute")),"0"));//分钏
		this.second=Long.valueOf(StrUtil.doNull(String.valueOf(data.get("second")),"0"));//秒
		this.description =String.valueOf(data.get("description"));//描述
		this.startTime = Integer.valueOf(StrUtil.doNull(String.valueOf(data.get("startTime")),"0"));//开始时点(0~23)
		this.endTime = Integer.valueOf(StrUtil.doNull(String.valueOf(data.get("endTime")),"0"));//结束时点(0~23)
		this.taskStatus = Integer.valueOf(StrUtil.doNull(String.valueOf(data.get("taskStatus")),"0"));//状态;
		this.sysName = String.valueOf(data.get("sysName"));
		this.serverIp=String.valueOf(data.get("serverIp"));
	}

	public String getSysName() {
		return sysName;
	}

	public void setSysName(String sysName) {
		this.sysName = sysName;
	}

	public String getServerIp() {
		return serverIp;
	}

	public void setServerIp(String serverIp) {
		this.serverIp = serverIp;
	}


}
